import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from "@/views/Login.vue";
import Register from "@/views/Register.vue";
import Element01 from "@/views/Element01.vue";
import ElementInput from "@/views/ElementInput.vue";
import ElementTable from "@/views/ElementTable.vue";
import MessageView from "@/views/MessageView.vue";
import DialogView from "@/views/DialogView.vue";
import PopconfirmView from "@/views/PopconfirmView.vue";

Vue.use(VueRouter)

// 创建路由列表
const  routes = [
    {
        path:'/',
        redirect:'/login'
    },
    {
        path:'/login',
        component: Login
    },
    {
        path:'/register',
        component: Register
    },
    {
        path:'/ele',
        component: Element01
    },
    {
        path:'/input',
        component: ElementInput
    },
    {
        path:'/table',
        component: ElementTable
    },
    {
        path:'/message',
        component: MessageView
    },
    {
        path:'/dialog',
        component: DialogView
    },
    ,
    {
        path:'/pop',
        component: PopconfirmView
    }
]

let  router = new VueRouter({
    routes
})

export default  router